<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="{:url('refund/index')}">退款记录</a></li>
    </ul>
    <form class="well form-inline margin-top-20" method="post" action="{:url('refund/index')}">
        <if condition="!$shop_id">
        店铺名称:
        <input type="text" class="form-control" style="width:130px;" name="name" value="{:input('request.name/s','')}" placeholder="请输入店铺名称">
        </if>
        用户昵称:
        <input type="text" class="form-control" style="width:130px;" name="nickname" value="{:input('request.nickname/s','')}" placeholder="请输入用户昵称">
        <input type="submit" class="btn btn-primary" value="搜索" />
        <a class="btn btn-danger" href="{:url('refund/index')}">清空</a>
    </form>
        <table class="table table-hover table-bordered table-list">
            <thead>
            <tr>
                <th>订单号</th>
                <th>用户昵称</th>
                <th>退款金额</th>
                <th>订单金额</th>
                <th>退款类型</th>
                <th>是否使用优惠券</th>
                <th>退款进度</th>
                <th>退货商品</th>
                <th>店铺</th>
                <th>退货原因</th>
                <th>图片</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <foreach name="list" item="vo">
                <tr>
                    <td>{$vo.ordernum}</td>
                    <td>{$vo.nickname}</td>
                    <td>{$vo.apply_price}</td>
                    <td>{$vo.pay_price}</td>
                    <td>{$vo['type'] == 1 ? '仅退款' : '退货退款'}</td>
                    <td>{$vo['is_coupon']}</td>
                    <if condition="$vo['status'] eq 1"><td>未审核</td></if>
                    <if condition="$vo['status'] eq 2"><td>通过</td></if>
                    <if condition="$vo['status'] eq 3"><td>拒绝</td></if>
                    <td>{$vo.goods_name}</td>
                    <td>{$vo.shopname}</td>
                    <td>{$vo.reason}</td>
                    <td>
                        <foreach name="$vo['img']" item="vv">
                            <img style="width:80px;height:80px;" src="{$vv}" alt="">
                        </foreach>
                    </td>
                    <td>
                        <if condition="$vo['status'] eq 1">
                        <a class="btn btn-xs btn-info" href="{:url('refund/edit',array('id'=>$vo['id'],'status'=>2))}">通过</a>
                        <a class="btn btn-xs btn-primary" href="{:url('refund/edit',array('id'=>$vo['id'],'status'=>3))}">拒绝</a>
                        </if>
                        <if condition="$vo['status'] eq 2">
                            <a class="btn btn-xs btn-primary" href="{:url('refund/edit',array('id'=>$vo['id'],'status'=>3))}">拒绝</a>
                        </if>
                        <if condition="$vo['status'] eq 3">
                            <a class="btn btn-xs btn-info" href="{:url('refund/edit',array('id'=>$vo['id'],'status'=>2))}">通过</a>
                        </if>
                    </td>
                </tr>
            </foreach>
            </tbody>
        </table>
        <div class="pagination">{$page|default=''}</div>
</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>